//
//  AVAudioPlayer+only.m
//  PantaKill
//
//  Created by 湛凯杰 on 16/7/27.
//  Copyright © 2016年 湛凯杰. All rights reserved.
//

#import "AVAudioPlayer+only.h"

@implementation AVAudioPlayer (only)
+(instancetype)sharelnstance{
    static AVAudioPlayer * player =nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        NSURL *url=[[NSBundle mainBundle]URLForResource:@"Numb.mp3" withExtension:nil];
        player =[[AVAudioPlayer alloc]initWithContentsOfURL:url error:nil];
        [player prepareToPlay];
        [player play];
        player.numberOfLoops=10;
         });
    return player;
}
@end
